package cz.muni.fi.pa165.library.client.gui.swing;

import java.awt.Dimension;
import java.awt.Point;
import java.awt.Toolkit;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 *
 * @author Equo
 */
public class Utils {

    /**
     * Used to get point where to set location of left upper corner of
     * application to center main frame of application
     *
     * @param frameDimension dimension of application frame
     * @return point for center allignement
     */
    public static Point getPointToCenterApplication(int frameWidth, int frameHeight) {
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        double xAxis = (screenSize.getWidth() - frameWidth) / 2;
        double yAxis = (screenSize.getHeight() - frameHeight) / 2;
        return new Point((int) xAxis, (int) yAxis);
    }
}
